function handletouchmove(event, that) {
  
    if (that.data.currentGesture != 0){
      return
    }
    let currentX = event.touches[0].pageX
    let currentY = event.touches[0].pageY
    let tx = currentX - that.data.lastX
    let ty = currentY - that.data.lastY
    
    let text = ""
    //左右方向滑动
    if (Math.abs(tx) > Math.abs(ty)) {
      if (tx < 0) {
        text = "向左滑动"
        // this.data.currentGesture = 1
      }
      else if (tx > 0) {
        text = "向右滑动"
        
        // this.data.currentGesture = 2
      }

    }
    //上下方向滑动
    else {
      if (ty < 0){
        text = "向上滑动"
        // this.data.currentGesture = 3
        that.pullUp(ty,event.touches[0].pageY);
      }
      else if (ty > 0) {
        text = "向下滑动"
        // this.data.currentGesture = 4
        that.dropDown(ty);
      }
      
    }


    //将当前坐标进行保存以进行下一次计算
    that.data.lastX = currentX
    that.data.lastY = currentY
    console.log(text)
    that.setData({
      text : text,
    });
  }


module.exports = {
  handletouchmove: handletouchmove
}
